<template>
	<view>
		<view class="section__title">点击您喜欢的预览框，即可播放相应的特效</view>
		<view class="schoollist">
			<view class="school-list">
				<block v-for="(item,i) in items" :key="i">
					<view class="school-list-item">
						<block v-for="(item_k,k) in 2" :key="k">
							<view v-if="items[i+k] != null && i%2 == 0 " class="school-list-info" :class="!isVerticalScreen ? 'img-size':''"
							 :data-special="items[i+k]" :data-index="i+k" @tap="chooseSpecial">
								<image :id="'img'+items[i+k].kid" :class="showId == items[i+k].kid ? 'school-list-photo-Selected':'school-list-photo'"
								 :src="items[i+k].imageContent" />
								<image v-if="items[i+k].free == 1" class="school-list-photo-free-up" src="../../static/images/free.png" />
								<image v-if="items[i+k].free == 0" class="school-list-photo-free-up" src="../../static/images/notfree.png" />
								<view v-if="items[i+k].state != 1" class="school-list-photo school-list-photo-up">
									<text class="school-list-notLoad">{{items[i+k].state == 0 ?'未下载' : '下载中'}}</text>
								</view>
								<text class="school-list-desc">{{items[i+k].name}}</text>
							</view>
						</block>
					</view>
				</block>
			</view>
		</view>
		<!-- 互动 -->
		<hudong ref="hudong" :hudongIp="hudongIp"></hudong>
		<!-- 密码校验 -->
		<check-pwd ref="pwd" :localServerIP="localIP"></check-pwd>
		<!-- 控制 -->
		<e-control ref="control"></e-control>
		<!-- 关于 -->
		<about-us ref="about"></about-us>
		<!-- 功能悬浮球 -->
		<!--bindmenuItemClick为按钮点击的时候的回调方法  mainmodel是显示的按钮，menulist为折叠的菜单的数组数据-->
		<movemenu @menuItemClick="menuItemClick"></movemenu>
	</view>
</template>

<script>
	const app = getApp()
	import websocket from '../../utils/websocket.js';
	import utils from '../../utils/util.js';
	var page = 1;
	var hadLastPage = false;
	var localsrcs = [];
	var cloundLists = [];
	var timer = null;


	import http from '../../utils/http.js'
	import hudong from '../../components/hudong/index.vue'
	import eControl from '../../components/control/index.vue'
	import aboutUs from '../../components/about/index.vue'
	import movemenu from '../../components/movemenu/movemenu.vue'
	import checkPwd from '../../components/checkPwd/index.vue'
	export default {
		components: {
			hudong,
			eControl,
			aboutUs,
			movemenu,
			checkPwd
		},
		data() {
			return {
				mubuIndex: 0,
				items: [],
				showId: '',
				state: "-1",
				notScanCode: true,
				ip: "",
				appType: '',
				isPaySuccess: false,
				localIP: '',
				sendQueue: [],
				hudongIp: '',
				isVerticalScreen: true, //是否是竖屏状态
			}
		},
		onLoad() {
			this.appType = uni.getSystemInfoSync().platform;
			// console.log(this.appType, 'appType----手机类型')
		},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow: function() {
			console.log('onShow');
			// console.log(app.globalData.userInfo);
			// this.createConnect()
			// uni.showLoading({
			// 	title: '加载中...',
			// 	mask: true
			// })
		},
		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide: function() {
			console.log("onhide");
			// clearInterval(timer);
			// uni.closeSocket();
		},
		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload: function() {
			console.log("onUnload");
			// clearInterval(timer);
			// uni.closeSocket();
		},
		created() {
			this.createConnect()
			uni.showLoading({
				title: '加载中...',
				// mask: true
			})
		},
		mounted() {

		},
		methods: {
			onResize() { //获取横竖屏状态
				uni.getSystemInfo({
					success: (res) => {
						// console.log(res.windowWidth);
						// console.log(res.windowHeight);
						if (res.windowWidth > res.windowHeight) {
							// console.log('横屏');
							this.isVerticalScreen = false;
						} else {
							// console.log('竖屏');
							this.isVerticalScreen = true;
						}
					}
				});
			},
			createConnect() {
				page = 1;
				hadLastPage = false;

				var connectData = utils.getStor('connectData') || '';
				if (connectData == '' || connectData == undefined) {
					this.setData({
						items: []
					});
					if (this.notScanCode) {
						uni.showToast({
							title: '登录可能已过期,请尝试重新扫码登录~',
							icon: "none",
							duration: 2000
						});
					}
					this.setData({
						notScanCode: true
					});
					return;
				}
				this.setData({
					ip: connectData
				});

				this.getSpecial();
			},
			setData(obj) { //转换this.xxx = xxxx
				const keys = Object.keys(obj);
				keys.forEach((key) => {
					this[key] = obj[key];
				});
			},
			getSpecial: function() {
				// 显示加载图标
				uni.showNavigationBarLoading();

				if (hadLastPage != false) {
					uni.hideNavigationBarLoading();
					uni.showToast({
						title: '没有加载的数据了',
						icon: 'none'
					});
					return;
				}

				// console.log('默认获取全部数据：');
				var data = {};
				data.command = "getsrc";
				data.type = "4"; //1-素材、2-场景、3-霸屏、
				data.classify = String(app.globalData.classifyId); //-1-代表全部、注意：霸屏时填写-1
				data.current = String(page); //请求第几页数据
				data.size = '8'; //每页请求数量
				data.state = '-1'; //-1-全部、0-未下载、1-已下载、
				data.mubuIndex = String(app.globalData.mubuIndex); //幕布索引
				data.dataStatus = '0'; //资源删除状态：-1-删除、0-正常、1-全部
				data.searchCondition = ''; //按照名称或编号模糊查询
				// console.log(JSON.stringify(data));
				console.log(data, '默认获取全部数据')
				// websocket.send(JSON.stringify(data));
				http.httpRequest(data).then(res => {
					// console.log(res,'http获取到的数据');
					this.returnResult(res)
				}, error => {
					console.log(error);
				})
			},

			// 选中特效
			chooseSpecial: function(e) {
				let that = this;
				// console.log(e.currentTarget.dataset, '选中特效数据')
				var special = e.currentTarget.dataset.special;
				var itemsIndex = e.currentTarget.dataset.index;
				this.setData({
					itemsIndex: itemsIndex,
					showId: special.kid
				});

				if (special.state == 0) {
					//未下载，先下载
					console.log("下载特效");
					var data = {};
					data.command = "changresstate";
					data.id = String(special.kid);
					data.type = "4";
					data.mubuIndex = String(app.globalData.mubuIndex)
					// console.log(JSON.stringify(data));
					// websocket.send(JSON.stringify(data));

					http.httpRequest(data).then(res => {
						// console.log(res,'http获取到的数据');
						uni.showToast({
							title: '下载中,请稍后...',
							icon: "none",
							duration: 2000
						})
						setTimeout(() => {
							this.returnResult(res)
						}, 1000)
					}, error => {
						console.log(error);
					})
				} else if (special.state == 1) {
					if (special.free == 1) { //0-收费、1-免费
						var data = {
							command: "playTexiao",
							ip: String(that.ip),
							mubuIndex: String(app.globalData.mubuIndex),
							no: String(special.no),
							fuseClassifyLabel: String(app.globalData.fuseClassifyLabel)
						}
						console.log(data, "播放特效");
						// websocket.send(JSON.stringify(data));
						http.httpRequest(data).then(res => {
							// console.log(res,'http获取到的数据');
							this.returnResult(res)
						}, error => {
							console.log(error);
						})
					} else {
						if (this.appType == 'ios') {
							uni.showToast({
								title: '暂不支持ios端，请使用Android手机体验',
								icon: 'none'
							})
						} else if (this.appType == 'android') {
							// 小程序支付
							// #ifdef MP-WEIXIN
							this.paymini(special);
							// #endif

							// app支付
							// #ifdef APP-PLUS
							this.payapp(special);
							// #endif
						} else {
							console.log('其他设备')
							// 小程序支付
							// #ifdef MP-WEIXIN
							this.paymini(special);
							// #endif

							// app支付
							// #ifdef APP-PLUS
							this.payapp(special);
							// #endif
						}
					}

				} else {
					//下载中
					uni.showToast({
						title: '下载中,请稍后...',
						icon: "none",
						duration: 2000
					})
				}
			},
			paymini: function(special) { //微信小程序支付
				let that = this;
				let dataMsg = {
					"avatarUrl": app.globalData.userInfo.avatarUrl,
					"city": app.globalData.userInfo.city,
					"country": app.globalData.userInfo.country,
					"gender": app.globalData.userInfo.gender,
					"nickName": app.globalData.userInfo.nickName,
					"openId": app.globalData.openId,
					"phoneNumber": app.globalData.phoneNumber,
					"province": app.globalData.userInfo.province,
					"userOrder": {
						"miniappId":utils.getMiniAppInfo(),
						"originalPrice": special.price, //价格
						"specialId": special.id, //maskscreenId 霸屏id，specialId 特效id
						"tradeType": "MA", //订单来源  MA小程序，APP
						"type": 1, //0霸屏，1特效
						"serialNo": app.globalData.series
					}
				}


				console.log(dataMsg, 'dataMsg')

				uni.login({
					provider: 'weixin',
					success: function(loginRes) {
						// console.log(loginRes, '--------loginRes---------')
						let code = loginRes.code;
						// 请求后台数据 prepay_id paySign nonceStr timeStamp
						uni.request({
							url: app.globalData.baseURL + '/wx/order/createOrder',
							data: dataMsg,
							method: "post",
							header: {
								"Content-Type": "application/json",
								"devno": app.globalData.series
							},
							success: (res) => {
								// console.log(res, '订单数据');

								uni.showLoading({
									title: '检测支付环境',
									mask: true
								})

								setTimeout(() => {
									uni.hideLoading();
									// 调起支付
									uni.requestPayment({
										provider: 'wxpay',
										timeStamp: res.data.timeStamp,
										nonceStr: res.data.nonceStr,
										package: res.data.packageValue,
										signType: 'MD5',
										paySign: res.data.paySign,
										success: (res) => {

											// console.log('success:' + JSON.stringify(res));
											console.log('success:', res);
											if (res.errMsg == 'requestPayment:ok') {
												//已下载，就播放
												var data = {
													command: "playTexiao",
													ip: String(that.ip),
													mubuIndex: String(app.globalData.mubuIndex),
													no: String(special.no),
													fuseClassifyLabel: String(app.globalData.fuseClassifyLabel)
												}
												console.log(data, "播放特效");
												//websocket.send(JSON.stringify(data));
												// that.sendQueue.push(data)
												http.httpRequest(data).then(res => {
													this.returnResult(res)
												}, error => {
													console.log(error);
												})
											}

										},
										fail: function(err) {
											console.log('fail:' + JSON.stringify(err));
											uni.showToast({
												title: '支付失败',
												duration: 2000
											})
										}
									});
								}, 2000)
							}
						});
					}
				});
			},
			payapp: function(special) { //App支付
				let that = this;
				let dataMsg = {
					"avatarUrl": app.globalData.userInfo.avatarUrl,
					"city": app.globalData.userInfo.city,
					"country": app.globalData.userInfo.country,
					"gender": app.globalData.userInfo.gender,
					"nickName": app.globalData.userInfo.nickName,
					"openId": app.globalData.openId,
					"phoneNumber": app.globalData.phoneNumber,
					"province": app.globalData.userInfo.province,
					"userOrder": {
						"originalPrice": special.price, //价格
						"specialId": special.id, //maskscreenId 霸屏id，specialId 特效id
						"tradeType": "APP", //订单来源  MA小程序，APP
						"type": 1, //0霸屏，1特效
						"serialNo": app.globalData.series
					}
				}


				// console.log(dataMsg, 'dataMsg')

				uni.login({
					provider: 'weixin',
					success: function(loginRes) {
						// console.log(loginRes, '--------loginRes---------')
						let code = loginRes.code;
						// 请求后台数据 prepay_id paySign nonceStr timeStamp
						uni.request({
							url: app.globalData.baseURL + '/wx/order/createOrder',
							data: dataMsg,
							method: "post",
							header: {
								"Content-Type": "application/json",
								"devno": app.globalData.series
							},
							success: (res) => {
								// console.log(res, '订单数据');

								uni.showLoading({
									title: '检测支付环境',
									mask: true
								})

								let orderInfo = {
									"appid": res.data.appId,
									"noncestr": res.data.nonceStr,
									"package": res.data.packageValue, // 固定值，以微信支付文档为主
									"partnerid": res.data.partnerId,
									"prepayid": res.data.prepayId,
									"timestamp": res.data.timeStamp,
									"sign": res.data.sign // 根据签名算法生成签名
								}


								setTimeout(() => {
									uni.hideLoading();
									// 调起支付
									uni.requestPayment({
										provider: 'wxpay',
										orderInfo: orderInfo, //微信、支付宝订单数据  
										success: (res) => {
											// console.log('success:', res);
											// console.log('success:' + JSON.stringify(res));
											if (res.errMsg == 'requestPayment:ok') {
												//已下载，就播放
												var data = {
													command: "playTexiao",
													ip: String(that.ip),
													mubuIndex: String(app.globalData.mubuIndex),
													no: String(special.no),
													fuseClassifyLabel: String(app.globalData.fuseClassifyLabel)
												}
												// console.log(data, "播放特效");
												//websocket.send(JSON.stringify(data));
												// that.sendQueue.push(data)

												http.httpRequest(data).then(res => {
													this.returnResult(res)
												}, error => {
													console.log(error);
												})
											}

										},
										fail: function(err) {
											console.log('fail:' + JSON.stringify(err));
											uni.showToast({
												title: '支付失败',
												duration: 2000
											})
										}
									});
								}, 2000)
							}
						});
					}
				})
			},
			returnResult(res) { //返回的结果

				let that = this;
				if (res == undefined) {
					uni.showToast({
						title: '登录可能已过期,请尝试重新扫码登录~',
						icon: "none",
						duration: 2000
					});
					return false;
				}

				// var jsonObj = JSON.parse(res.data);
				if (res.data != undefined) {
					var jsonObj = res.data;
					console.log(jsonObj, "接受服务器返回来的消息");

					//下载中
					if (jsonObj.command == "changresstate" && jsonObj.type == 4) {
						var id = jsonObj.id;
						var data = that.items;
						// console.log(id);
						// console.log(data);
						for (let i = 0; i < data.length; i++) {
							if (data[i].kid == id) {
								var state = 'items[' + i + '].state';
								if (jsonObj.state == 1) {
									setTimeout(function() {
										data[i].state = jsonObj.state
									}, 1500);
								} else {
									data[i].state = jsonObj.state
								}
								break;
							}
						}
					}
					if (jsonObj.command == "sendctrl") {
						if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						}
					}

					if (jsonObj.command == "login") {
						uni.hideLoading()
						if (jsonObj.result == "SUCCESS") {
							// that.getSpecial();
						} else {
							utils.showErrorMsgFun(jsonObj);
						}
					}
					if (jsonObj.command == "getsrc") {
						uni.hideLoading();
						if (jsonObj.result == "SUCCESS") {

							if (jsonObj.datas != undefined) {
								var data = jsonObj.datas;
								// var data = app.globalData.scenesData;
								// console.log(page,'---------page-------')
								var item = page > 1 ? that.items : [];

								// console.log(item,'item')
								// console.log(data);
								// console.log(item);
								data.forEach((items, index, arr) => {
									// if (items.state == that.state || that.state == "-1") {
									if (items.imageContent != undefined) {
										var base64 = items.imageContent;
										if (base64 != null) {
											items.imageContent = base64.replace(/[\r\n]/g, "");
										}
									}
									item.push(items);
									// }
								});
								// console.log(item,'最终结果');
								that.setData({
									items: item
								});
								if (data.length > 0) {
									page++;
								} else {
									hadLastPage = true;
								}
								uni.hideNavigationBarLoading();
							}

						} else if (jsonObj.result == "FAILED") {
							utils.showErrorMsgFun(jsonObj);
						}
					}

					if (jsonObj.command == "playTexiao" && jsonObj.result == "FAILED") {
						utils.showErrorMsgFun(jsonObj);
					}

					//互动服务器
					if (jsonObj.command == "hudong" && jsonObj.result == 'SUCCESS') {
						uni.showToast({
							title: '操作成功～',
							icon: 'none'
						})
					}
				}

			},
			menuItemSendHttp(data) { //搜索菜单发送请求
				http.httpRequest(data).then(res => {
					// console.log(res,'http获取到的数据');
					this.returnResult(res)
				}, error => {
					console.log(error);
				})
			},
			menuItemClick: function(res) {
				// console.log(res, '--------res-------')
				//获取点击事件的信息
				let clickInfo = res;
				// console.log(clickInfo);
				// 根据不同类型进行判别处理
				//事件的处理 代码
				switch (clickInfo.id) {
					case "1":
						// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":0,"ctl":0}');
						let volUp = {
							command: "vol",
							mubuIndex: String(app.globalData.mubuIndex),
							type: '0',
							ctl: '0'
						}
						this.menuItemSendHttp(volUp);
						break;
					case "2":
						// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":0,"ctl":1}');
						let volDown = {
							command: "vol",
							mubuIndex: String(app.globalData.mubuIndex),
							type: '0',
							ctl: '1'
						}
						this.menuItemSendHttp(volDown);
						break;
					case "3":
						if (clickInfo.isPlayVideo) { //播放
							// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":1,"ctl":1}');
							let play = {
								command: "vol",
								mubuIndex: String(app.globalData.mubuIndex),
								type: '1',
								ctl: '1'
							}
							this.menuItemSendHttp(play);
						} else { //暂停
							// websocket.send('{ "command": "vol","mubuIndex":' + Number(app.globalData.mubuIndex) + ',"type":1,"ctl":0}');
							let pause = {
								command: "vol",
								mubuIndex: String(app.globalData.mubuIndex),
								type: '1',
								ctl: '0'
							}
							this.menuItemSendHttp(pause);
						}
						break;
					case "5":
						// websocket.send('{ "command": "sendctrl","v":"43","d":{"k1":' + app.globalData.mubuIndex + ',"k2":1}}');
						let pause = {
							command: "sendctrl",
							v: '43',
							d: JSON.stringify({
								k1: String(app.globalData.mubuIndex),
								k2: '1'
							})
						}
						this.menuItemSendHttp(pause);
						break;
					case "6":
						this.setData({
							notScanCode: false
						});

						//#ifdef MP-WEIXIN
						app.globalData.loginType = 0;
						//#endif 

						//#ifdef APP-PLUS
						app.globalData.loginType = 1;
						//#endif 

						uni.scanCode({
							success: (res) => {
								let arr = [];
								if(res.result.indexOf("http://mp2")==0){
									arr = res.result.split("=")[1].split(",");
								}else{
									arr = res.result.split(",");
								}
								console.log(arr);
								if (arr.length > 1) {
									app.globalData.mubuIndex = arr[1];
									utils.setStor('connectData', arr[0]);
									uni.setStorageSync('mubuIndex', arr[1]);

								} else {
									app.globalData.mubuIndex = 0;
									utils.setStor('connectData', arr);
									uni.setStorageSync('mubuIndex', 0);
								}
								this.setData({
									ip: utils.getStor('connectData'),
									items: []
								});
								// uni.closeSocket()
								this.createConnect();
							},
							fail: (res) => {
								uni.showToast({
									title: '扫码失败~',
									icon: 'none',
									duration: 2000
								})
							},
							complete: (res) => {}
						});
						break;
					case "7":
						if (app.globalData.mainMubuNo == 1) {
							uni.showToast({
								title: '暂无操作权限~',
								icon: 'none'
							})
						} else {
							// websocket.send('{ "command": "sendctrl","v":"43","d":{"k1":' + app.globalData.mubuIndex + ',"k2":0}}');
							let bg = {
								command: "sendctrl",
								v: '43',
								d: JSON.stringify({
									k1: String(app.globalData.mubuIndex),
									k2: '0'
								})
							}
							this.menuItemSendHttp(bg);
						}
						break;
					case "8": //控制按钮
						// this.$refs.control.pwdDialog = 'checkPwd'
						// this.$refs.control.isShowSelectOpt = true
						let serverIP = '';
						//#ifdef MP-WEIXIN
						uni.showToast({
							title: '暂时无法使用~',
							icon: 'none'
						})
						// this.$refs.pwd.pwdDialog = 'Modal'
						// serverIP = uni.getStorageSync('zkLocalIP') || '';

						// if(serverIP == '' || serverIP == undefined){
						// 	this.localIP = serverIP
						// }else{
						// 	this.localIP = serverIP
						// }
						//#endif 

						//#ifdef APP-PLUS
						this.$refs.pwd.pwdDialog = 'Modal'
						serverIP = uni.getStorageSync('zkLocalIP') || '';
						if (serverIP == '' || serverIP == undefined) {
							this.localIP = serverIP
						} else {
							this.localIP = serverIP
						}
						//#endif 
						break;
					case "9": //互动
						this.$refs.hudong.modalName = 'modal'
						this.hudongIp = uni.getStorageSync('hudongIp') || '';
						break;
					case "10": //关于
						this.$refs.about.modalName = 'modal'
						break;
				}
			},
		},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh: function() {
			console.log("执行下拉");
			// 显示顶部刷新图标
			uni.showNavigationBarLoading();
			page = 1;
			hadLastPage = false;
			// this.setData({
			// 	items: []
			// });
			this.getSpecial();

			// 隐藏导航栏加载框
			uni.hideNavigationBarLoading();

			uni.stopPullDownRefresh();

			uni.showLoading({
				title: '加载中...',
				// mask: true
			})
		},

		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom: function() {
			console.log("执行上拉");
			this.getSpecial();
		},

		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {

		}
	}
</script>


<style>
	/* page {
		background-color: #313247;
	} */
</style>
<style scoped>
	.section__title {
		width: 100%;
		position: fixed;
		top: 0rpx;
		z-index: 22;
		font-size: 18px;
		color: #fff;
		padding: 20rpx 40rpx;
		background-color: #313247;
	}

	.schoollist {
		padding-top: 74rpx;
		padding-bottom: 150rpx;
	}

	.school-list-item {
		background-color: #3A3A52;
		width: 100%;
		margin-top: 10rpx;
		margin-bottom: 20rpx;
		display: flex;
		flex-wrap: nowrap;
	}

	.school-list-info {
		position: relative;
		width: 40%;
		margin: 40rpx 40rpx 20rpx 40rpx;
		border-radius: 8rpx;
		text-align: center;
	}

	.school-list-photo,
	.school-list-photo-Selected {
		width: 100%;
		height: 180rpx;
		border-radius: 8rpx;
		vertical-align: middle;
		border: 4rpx solid #666;
		box-sizing: border-box;
	}

	.school-list-photo-Selected {
		border: 4rpx solid #ffe570;
	}

	.school-list-photo-up {
		position: absolute;
		z-index: 2;
		top: 0;
		left: 0;
		background: rgba(0, 0, 0, 0.6);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.school-list-notLoad {
		color: #fff;
		font-size: 30rpx;
	}

	.school-list-desc {
		display: block;
		color: #fff;
		text-align: center;
		font-size: 25rpx;
		padding: 10rpx;
	}

	.school-list-photo-free-up {
		position: absolute;
		z-index: 2;
		top: 0;
		right: 0;
		width: 50rpx;
		height: 84rpx;
	}

	.img-size .school-list-photo,.img-size .school-list-photo-Selected {
		/* height: 220rpx !important; */
	}

	@media screen and (min-width: 769px) {
		.nav {
			height: 60rpx !important;
		}

		.nav view {
			font-size: 22px !important;
			line-height: 60rpx !important;
		}

		.nav .default {
			line-height: 60rpx !important;
		}

		.school-list-item {
			margin-bottom: 0 !important;
		}

		.img-size .school-list-photo,.img-size .school-list-photo-Selected {
			height: 220rpx !important;
		}

		.schoollist {
			padding-top: 68rpx !important;
		}

		.school-list-info {
			width: 45% !important;
			margin: 30rpx 30rpx 10rpx 30rpx !important;
		}
	}

	@media screen and (min-device-width: 641px) and (max-device-width: 768px) {
		.nav {
			height: 60rpx !important;
		}

		.nav view {
			font-size: 22px !important;
			line-height: 60rpx !important;
		}

		.nav .default {
			line-height: 60rpx !important;
		}

		.school-list-item {
			margin-bottom: 0 !important;
		}

		.img-size .school-list-photo,.img-size .school-list-photo-Selected {
			height: 220rpx !important;
		}

		.schoollist {
			padding-top: 68rpx !important;
		}

		.school-list-info {
			width: 45% !important;
			margin: 30rpx 30rpx 10rpx 30rpx !important;
		}
		
	}
	
	@media screen and (min-device-width: 401px) and (max-device-width: 640px) {
		.section__title {
			width: 100%;
			position: fixed;
			top: 0rpx;
			z-index: 22;
			font-size: 18px;
			color: #fff;
			padding: 20rpx 40rpx;
			background-color: #313247;
		}
		
		.schoollist {
			padding-top: 74rpx;
			padding-bottom: 150rpx;
		}
		
		.school-list-item {
			background-color: #3A3A52;
			width: 100%;
			margin-top: 10rpx;
			margin-bottom: 20rpx;
			display: flex;
			flex-wrap: nowrap;
		}
		
		.school-list-info {
			position: relative;
			width: 40%;
			margin: 40rpx 40rpx 20rpx 40rpx;
			border-radius: 8rpx;
			text-align: center;
		}
		
		.school-list-photo,
		.school-list-photo-Selected {
			width: 100%;
			height: 180rpx;
			border-radius: 8rpx;
			vertical-align: middle;
			border: 4rpx solid #666;
			box-sizing: border-box;
		}
		
		.school-list-photo-Selected {
			border: 4rpx solid #ffe570;
		}
		
		.school-list-photo-up {
			position: absolute;
			z-index: 2;
			top: 0;
			left: 0;
			background: rgba(0, 0, 0, 0.6);
			display: flex;
			align-items: center;
			justify-content: center;
		}
		
		.school-list-notLoad {
			color: #fff;
			font-size: 30rpx;
		}
		
		.school-list-desc {
			display: block;
			color: #fff;
			text-align: center;
			font-size: 25rpx;
			padding: 10rpx;
		}
		
		.school-list-photo-free-up {
			position: absolute;
			z-index: 2;
			top: 0;
			right: 0;
			width: 50rpx;
			height: 84rpx;
		}
	}
	
	@media only screen and (max-device-width: 400px) {
		.section__title {
			width: 100%;
			position: fixed;
			top: 0rpx;
			z-index: 22;
			font-size: 18px;
			color: #fff;
			padding: 20rpx 40rpx;
			background-color: #313247;
		}
		
		.schoollist {
			padding-top: 74rpx;
			padding-bottom: 150rpx;
		}
		
		.school-list-item {
			background-color: #3A3A52;
			width: 100%;
			margin-top: 10rpx;
			margin-bottom: 20rpx;
			display: flex;
			flex-wrap: nowrap;
		}
		
		.school-list-info {
			position: relative;
			width: 40%;
			margin: 40rpx 40rpx 20rpx 40rpx;
			border-radius: 8rpx;
			text-align: center;
		}
		
		.school-list-photo,
		.school-list-photo-Selected {
			width: 100%;
			height: 180rpx;
			border-radius: 8rpx;
			vertical-align: middle;
			border: 4rpx solid #666;
			box-sizing: border-box;
		}
		
		.school-list-photo-Selected {
			border: 4rpx solid #ffe570;
		}
		
		.school-list-photo-up {
			position: absolute;
			z-index: 2;
			top: 0;
			left: 0;
			background: rgba(0, 0, 0, 0.6);
			display: flex;
			align-items: center;
			justify-content: center;
		}
		
		.school-list-notLoad {
			color: #fff;
			font-size: 30rpx;
		}
		
		.school-list-desc {
			display: block;
			color: #fff;
			text-align: center;
			font-size: 25rpx;
			padding: 10rpx;
		}
		
		.school-list-photo-free-up {
			position: absolute;
			z-index: 2;
			top: 0;
			right: 0;
			width: 50rpx;
			height: 84rpx;
		}
	}
</style>
